find duplicate characters in string java using collections